package cn.itcast.feign.config;

import cn.itcast.feign.client.fallback.UserClientFallbackFactory;
import feign.Logger;
import org.springframework.context.annotation.Bean;

/**
 * 使用Java代码, 自定义Feign的配置
 *
 * @author llhuang10
 * @date 2021/8/21 9:18
 */
// 全局配置
public class DefaultFeignClientConfiguration {


    @Bean
    public Logger.Level logLevel() {
        return Logger.Level.BASIC;
    }


    @Bean
    public UserClientFallbackFactory userClientFallbackFactory() {
        return new UserClientFallbackFactory();
    }
}
